import Vue from 'vue'
import App from './App.vue'
import './utils/reset.css';
import router from './router'
import './utils/rem'
import $ from 'jquery'
import Cookies from 'js-cookie'

import { Search } from 'vant';
import { Cell, CellGroup } from 'vant';

Vue.use(Cell);
Vue.use(CellGroup);
Vue.use(Search);

import VueI18n from "vue-i18n";
import {
	Locale
} from 'vant';

// 引入英文语言包
import zhLocale from 'vant/es/locale/lang/zh-CN';
import enLocale from 'vant/es/locale/lang/en-US';

Vue.use(VueI18n);


Locale.use('zh-CN', zhLocale);
Locale.use('en-US', enLocale);


const i18n = new VueI18n({
  locale: Cookies.get('locale') || 'zh', // 语言标识
  messages: {
    'zh': require('./i18n/langs/zn'),
    'en': require('./i18n/langs/en')
  },
})

import './permission' // 路由权限

Vue.config.productionTip = false

window.$ = $
Vue.prototype.$cookies = Cookies;

new Vue({
	router,
	i18n,
	render: h => h(App)
}).$mount('#app')
